package com.kaibes.orm.core.util;

import com.kaibes.core.base.util.StringUtils;
import com.kaibes.orm.core.annotation.Table;

public class TableUtils {

	public static String getTableName(Class<?> entityClass) {
		if (entityClass.isAnnotationPresent(Table.class)) {
            return entityClass.getDeclaredAnnotation(Table.class).value();
        } else {
        	return StringUtils.humpToLine(StringUtils.lowerCaseFirst(entityClass.getSimpleName()));
        }
	}
	
}
